/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
import org.hibernate.Criteria;
import org.orm.PersistentException;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class CuestionarioCriteria extends AbstractORMCriteria {
	public final IntegerExpression cod_cuestionario;
	public final StringExpression descripion;
	
	public CuestionarioCriteria(Criteria criteria) {
		super(criteria);
		cod_cuestionario = new IntegerExpression("cod_cuestionario", this);
		descripion = new StringExpression("descripion", this);
	}
	
	public CuestionarioCriteria(PersistentSession session) {
		this(session.createCriteria(Cuestionario.class));
	}
	
	public CuestionarioCriteria() throws PersistentException {
		this(BasededatosPersistentManager.instance().getSession());
	}
	
	public MedicoCriteria createMedicoCriteria() {
		return new MedicoCriteria(createCriteria("ORM_Medico"));
	}
	
	public PreguntaCriteria createPreguntaCriteria() {
		return new PreguntaCriteria(createCriteria("ORM_Pregunta"));
	}
	
	public Cuestionario uniqueCuestionario() {
		return (Cuestionario) super.uniqueResult();
	}
	
	public Cuestionario[] listCuestionario() {
		java.util.List list = super.list();
		return (Cuestionario[]) list.toArray(new Cuestionario[list.size()]);
	}
}

